package com.cyq.day16.game;

public class Doctor extends Hero {
    int atk;
    int hp;
    int def;

    @Override
    public void introduce() {
        super.introduce();
        this.hp = super.level * 8;
        this.atk = super.level;
        this.def = super.level * 2;
        System.out.println("我的职业是医生");
        System.out.println("我拥有" + hp + "血" + atk + "攻击力" + def + "防御力");
    }

    @Override
    public void skill(Hero h) {
        super.skill(h);
        System.out.println("治疗");
        this.hp += this.level * 2;
        if (this.hp+this.level*2>hp){
        }
        if (h instanceof Doctor) {
        } else {
            this.gold -= this.level * 2;
        }
    }

    @Override
    public void show() {
        super.show();
        System.out.println("血量"+this.hp+"攻击力"+this.atk+"防御力"+this.def);
    }
}
